home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / utils / bibtools / subset-nocomment.bst < prev    next >
Text File  |  1992-09-03  |  5KB  |  249 lines

  1. % BibTeX bibliography style `subset'
  2. % by David Kotz dfk@cs.dartmouth.edu
  3. % August 1992
  4. %   This takes an aux file and produces an unusual .bbl file,
  5. % that is actually in .bib format -- but it has all of the references,
  6. % and strings expanded. Thus, it becomes a complete, portable .bib
  7. % file. Doesn't handle crossrefs?
  8. %  modified from
  9.    % BibTeX bibliography style `abstract' 
  10.    % by David Kotz dfk@cs.duke.edu
  11.    % March 1989
  12.    %  modified from
  13.    %  BibTeX standard bibliography style `alpha'
  14.      % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  15.       % Copyright (C) 1985, all rights reserved.
  16.       % Copying of this file is authorized only if either
  17.       % (1) you make absolutely no changes to your copy, including name, or
  18.       % (2) if you do make changes, you name it something other than
  19.       % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  20.       % This restriction helps ensure that all standard styles are identical.
  21.       % The file btxbst.doc has the documentation for this style.
  22.  
  23. % DFK added abstract, comment, keyword to standard set
  24. ENTRY
  25.   { abstract
  26.     address
  27.     author
  28.     booktitle
  29.     chapter
  30.     comment
  31.     edition
  32.     editor
  33.     howpublished
  34.     institution
  35.     journal
  36.     key
  37.     keyword
  38.     month
  39.     note
  40.     number
  41.     organization
  42.     pages
  43.     publisher
  44.     school
  45.     series
  46.     title
  47.     type
  48.     volume
  49.     year
  50.   }
  51.   {}
  52.   { label extra.label sort.label }
  53.  
  54. STRINGS { s t }
  55.  
  56. % output a field; the top is the text, the next to top is the name of
  57. % the field, and we know that the text is nonnull.
  58. % we start by finishing the previous line
  59. FUNCTION {output.field}
  60. {
  61.   ", " write$             % write comma and newline
  62.   newline$
  63.   "  " write$             % and a respectable indentation
  64.  
  65.   swap$                            % now field name is on top
  66.   " = {" *                        % put = {
  67.   swap$ *                           % now text is back on top; concatenate
  68.   "}" *                            % put }
  69.   write$
  70. }
  71.  
  72. % output if top not empty; below the top is the name of the field
  73. FUNCTION {output}
  74. { duplicate$ empty$
  75.     { pop$ pop$ }
  76.     'output.field
  77.   if$
  78. }
  79.  
  80. % Takes name of type as argument, and prints @ line
  81. % then it prints each field 
  82. FUNCTION {output.bibitem}
  83. {
  84. % write the @ line
  85.   "@" swap$ * write$              % @type
  86.   "{" cite$ * write$            % {citekey
  87.  
  88. % The fields, in what seems to be a good order
  89.   "key" key output
  90.   "author" author output
  91.   "title" title output
  92.  
  93.   "journal" journal output
  94.   "booktitle" booktitle output
  95.  
  96.   "chapter" chapter output
  97.   "edition" edition output
  98.   "editor" editor output
  99.  
  100.   "year" year output
  101.   "month" month output
  102.   "series" series output
  103.   "volume" volume output
  104.   "number" number output
  105.   "type" type output
  106.  
  107.   "pages" pages output
  108.  
  109.   "institution" institution output
  110.   "school" school output
  111.   "organization" organization output
  112.   "publisher" publisher output
  113.   "howpublished" howpublished output
  114.   "address" address output
  115.  
  116.   "note" note output
  117.  
  118.   "keyword" keyword output
  119.   "abstract" abstract output
  120. % leave out the comments here
  121. %  "comment" comment output
  122.  
  123. % finish entry
  124.   newline$
  125.   "}" write$ 
  126.   newline$
  127.   newline$
  128. }
  129.  
  130. FUNCTION {article}{ "Article" output.bibitem }
  131.  
  132. FUNCTION {book}{ "Book" output.bibitem }
  133.  
  134. FUNCTION {booklet}{ "Booklet" output.bibitem }
  135.  
  136. FUNCTION {inbook}{ "InBook" output.bibitem }
  137.  
  138. FUNCTION {incollection}{ "InCollection" output.bibitem }
  139.  
  140. FUNCTION {inproceedings}{ "InProceedings" output.bibitem }
  141.  
  142. FUNCTION {conference}{ "Conference" output.bibitem }
  143.  
  144. FUNCTION {manual}{ "Manual" output.bibitem }
  145.  
  146. FUNCTION {mastersthesis}{ "MastersThesis" output.bibitem }
  147.  
  148. FUNCTION {misc}{ "Misc" output.bibitem }
  149.  
  150. FUNCTION {phdthesis}{ "PhdThesis" output.bibitem }
  151.  
  152. FUNCTION {proceedings}{ "Proceedings" output.bibitem }
  153.  
  154. FUNCTION {techreport}{ "TechReport" output.bibitem }
  155.  
  156. FUNCTION {unpublished}{ "Unpublished" output.bibitem }
  157.  
  158. FUNCTION {default.type} { misc }
  159.  
  160. MACRO {jan} {"January"}
  161.  
  162. MACRO {feb} {"February"}
  163.  
  164. MACRO {mar} {"March"}
  165.  
  166. MACRO {apr} {"April"}
  167.  
  168. MACRO {may} {"May"}
  169.  
  170. MACRO {jun} {"June"}
  171.  
  172. MACRO {jul} {"July"}
  173.  
  174. MACRO {aug} {"August"}
  175.  
  176. MACRO {sep} {"September"}
  177.  
  178. MACRO {oct} {"October"}
  179.  
  180. MACRO {nov} {"November"}
  181.  
  182. MACRO {dec} {"December"}
  183.  
  184. MACRO {acmcs} {"ACM Computing Surveys"}
  185.  
  186. MACRO {acta} {"Acta Informatica"}
  187.  
  188. MACRO {cacm} {"Communications of the ACM"}
  189.  
  190. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  191.  
  192. MACRO {ibmsj} {"IBM Systems Journal"}
  193.  
  194. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  195.  
  196. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  197.  
  198. MACRO {ieeetcad}
  199.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  200.  
  201. MACRO {ipl} {"Information Processing Letters"}
  202.  
  203. MACRO {jacm} {"Journal of the ACM"}
  204.  
  205. MACRO {jcss} {"Journal of Computer and System Sciences"}
  206.  
  207. MACRO {scp} {"Science of Computer Programming"}
  208.  
  209. MACRO {sicomp} {"SIAM Journal on Computing"}
  210.  
  211. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  212.  
  213. MACRO {tods} {"ACM Transactions on Database Systems"}
  214.  
  215. MACRO {tog} {"ACM Transactions on Graphics"}
  216.  
  217. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  218.  
  219. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  220.  
  221. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  222.  
  223. MACRO {tcs} {"Theoretical Computer Science"}
  224.  
  225. READ
  226.  
  227. % DFK use cite$ for sort key
  228. FUNCTION {presort}
  229. {
  230.   cite$
  231.   #1 entry.max$ substring$
  232.   'sort.key$ :=
  233. }
  234.  
  235. ITERATE {presort}
  236.  
  237. SORT
  238.  
  239. FUNCTION {begin.bib}
  240. {
  241.   "% BibTeX bibliography file" write$ 
  242.   newline$ 
  243.   newline$
  244. }
  245.  
  246. EXECUTE {begin.bib}
  247.  
  248. ITERATE {call.type$}
  249.